<%Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
'HienSX
sort=Request("sort")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Tim kiem</title>
<!--#include file="..\CheckSession.inc"-->
<!--#include file="..\jvFunction.inc"-->
</head>
<body style="font-family: Times New Roman" topmargin=0 leftmargin=0 bgcolor=#F8F9D9>
<form method="post" name="Noidung">
<!-- HienSX -->
<Input TYPE="hidden" name="Sort" value="<%=sort%>">
  <input name="TxtID" size="50" type="hidden">
  <table width="100%" bgColor="#BDD5D0" border="0" borderColor="#111111" cellSpacing="0" style="BORDER-BOTTOM-COLOR: #c0c0c0; BORDER-BOTTOM-STYLE: solid; BORDER-COLLAPSE: collapse; BORDER-LEFT-COLOR: #c0c0c0; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-COLOR: #c0c0c0; BORDER-RIGHT-STYLE: solid; BORDER-TOP-COLOR: #c0c0c0; BORDER-TOP-STYLE: solid; FONT-SIZE: 12pt" >
    <tbody>
      <tr>
        <td align="middle" bgColor="#000080" colSpan="7" width="100%">
	  <%if request("print")="OK" then%>
	<p align="center"><font color="#ffffff">THÔNG TIN TÌM KIẾM IN</font></p>
	<%else%>
        <p align="center"><font color="#ffffff">THÔNG TIN TÌM KIẾM</font></p>
	<%end if%>
        </td>
      </tr>
      <tr>
        <td width="15%" >Số đi</td>
		<td width="15%"><input name=TxtSoden style="font-family:times new roman;width:100%;" size="20" LANGUAGE=javascript onkeyup="return TxtSoden_onkeyup(this.value)"></td>
	<td width="15%" align=center>===></td>
	<td width="15%">
    <input name=TxtDenso style="font-family:times new roman;width:100%;" size="20"></td>
        <td width="15%" align=center>
        Năm</td>
	<td width="15%">
    <input name=TxtNam maxlength=4 style="font-family:times new roman;width:100%;" size="20" value=<%=year(Date())%>></td>
	<td width="10%" >&nbsp;</td>
      </tr>
      <tr>
        <td width="15%" >Ngày ký</td>
        <td width="15%">
        <input name=TxtTungay disabled style="font-family:times new roman;width:100%;background-color:#C0C0C0" size="20" maxlength=10 LANGUAGE=javascript onkeyup="return TxtTungay_onkeyup(this.value)"></td>
        <td width="15%" align=center>===></td>                
        <td width="15%">
        <input name=TxtDenngay disabled style="font-family:times new roman;width:100%;background-color:#C0C0C0" size="20" maxlength=10 LANGUAGE=javascript onkeyup="return TxtDenngay_onkeyup(this.value)"></td>
        <td width="15%" align=center>
        <INPUT TYPE="checkbox" NAME="CHK"  onclick="return Cmd(true)" value="ON"></td>        
        <td width="25%" colspan=2>
    			<label for=C1 >Tìm chính xác</label>
			<INPUT TYPE="checkbox" NAME="chkTimCX" value="ON"  id=C1>		
   	   </td>

      </tr>
      <tr>
        <td width="15%" >Số ký hiệu</td>
        <td width="30%" colspan=2><input name=TxtSKH style="font-family:times new roman;width:100%" size="20"></td>
<!-- HienNoinhan -->
		<td width="15%"><input type=button value="Nơi nhận" name="CmdNoinhan" onclick="javascript:openNN()" style="font-family:Arial;width:100%; background-color=#BDD5D0"></td>
		<td width="40%" colspan="3"><input type="text" name="TxtNoinhan" maxlength=500 style="font-family:Arial;width:100%" size="20"></td>
      </tr>
      <tr>
        <td width="15%" >Tên loại VB</td>
        <td width="30%" colspan=2>
        	<Select name=ComboLoaiVB style="font-family:Arial;width:100%">
        		<option value=""></option>
        		<%
        			sSQL="Select * from PHAN_LOAI_DI"
				Set Rec=server.CreateObject("ADODB.Recordset")
				Rec.CursorType=3
				Rec.CacheSize=5
				Rec.Open sSQL,Conn
				Do While not Rec.EOF
			%>
				<option value=<%=Rec("IDLoai")%>>	<%=Rec("TEN_HINH_THUC")%></option>
			<%
					Rec.Movenext
				Loop
				Rec.close
				Set Rec=nothing
			%>	
        	</select>
        </td>
		<td width="15%" align=center>Đơn vị soạn</td>
		<td width="40%" colspan="3"><input type="text" name="TxtDVsoan" maxlength=500 style="font-family:Arial;width:100%" size="20"></td>
      </tr>
      <tr>
        <td width="15%" >Trích yếu</td>
        <td width="85%" colspan=6>
        <input name=TxtTrichyeu style="font-family:times new roman;width:100%" size="20"></td>
      </tr>
      <tr>
        <td width="15%" >Tóm tắt ND</td>
        <td width="85%" colspan=6>
        <input name=TxtND style="font-family:times new roman;width:100%" size="20"></td>
      </tr>
      <tr>
        <td width="15%" >Người ký</td>
        <td width="30%" colspan=2>
        <input name=TxtNguoiky style="font-family:times new roman;width:100%" size="20"></td>        
        <td width="15%" align=center>Từ khoá</td>
        <td width="40%" colspan=3>
        <input name=TxtTukhoa style="font-family:times new roman;width:100%" size="20"></td>  
      </tr>
      <tr>
        <td width="15%"></td>
        <td width="15%"></td>
        <td width="15%"></td>
        <td width="15%"></td>
        <td width="15%"></td>
        <td width="15%"></td>
        <td width="10%"></td>
      </tr>
    </tbody>
  </table>
  <Div align=center><input name=CmdOK type=button style="font-family:times new roman;width:100" value="Tìm kiếm" language=javascript onclick="return OK()"><input style="font-family:times new roman;width:100" name=CmdExit type=button value="Đóng" language=javascript onclick="javascript:window.close()"></Div>
</form>
</body>
<Script language=javascript>
function openNN(sObj) {
  popupWin = window.open('SearchTK.asp?bType=DI','new_page1','width=300,height=300').focus();
}
function KT(){
	if(trim(Noidung.TxtTungay.value)!="" && Noidung.TxtTungay.disabled==false){
		if(!isDate(Noidung.TxtTungay.value)){
			alert("Ngay khong hop le !");
			Noidung.TxtTungay.focus();
			return false;
		}
	}
	if(trim(Noidung.TxtDenngay.value)!="" && Noidung.TxtDenngay.disabled==false){
		if(!isDate(Noidung.TxtDenngay.value)){
			alert("Ngay khong hop le !");
			Noidung.TxtDenngay.focus();
			return false;
		}
	}
	if(trim(Noidung.TxtNam.value)!="" && Noidung.TxtNam.disabled==false){
		if(!IsNumeric(Noidung.TxtNam.value)){
			alert("Nam khong hop le !");
			Noidung.TxtNam.focus();
			return false;
		}
	}
	if(trim(Noidung.TxtSoden.value)!="") {
		if(!IsNumeric(Noidung.TxtSoden.value)){
			alert("So den khong hop le !");
			Noidung.TxtSoden.focus();
			return false;
		}
	}
	if(trim(Noidung.TxtDenso.value)!="") {
		if(!IsNumeric(Noidung.TxtDenso.value)){
			alert("So den khong hop le !");
			Noidung.TxtDenso.focus();
			return false;
		}
	}
	return true;
}
function OK(){
	if(KT()){
		if(Noidung.CHK.checked){
//HienSX
		Noidung.action="frmdsvtdi.asp?bComm=search&VT=VTDI&bLoai=1&sort="+Noidung.Sort.value;
		}else{
			Noidung.action="frmdsvtdi.asp?bComm=search&VT=VTDI&bLoai=0&sort="+Noidung.Sort.value;
		}
		Noidung.target="right";
		Noidung.submit();
		window.close;
	}
}
function TxtTungay_onkeyup(str){
var keycode
keycode=window.event.keyCode
if (isEdit(keycode,str)){
	Noidung.TxtTungay.value=editdate(trim(str))
}
Noidung.TxtDenngay.value=Noidung.TxtTungay.value
}

function TxtDenngay_onkeyup(str){
var keycode
keycode=window.event.keyCode
if (isEdit(keycode,str)){
	Noidung.TxtDenngay.value=editdate(trim(str))
}
}

function TxtSoden_onkeyup(str){
	Noidung.TxtDenso.value=Noidung.TxtSoden.value
}

</script>
</html>